package com.enumeration;
//枚举的测试类
public class SeasonsDemo {
    public static void main(String[] args) {
        Seasons seasons1 = Seasons.SPRING;
        System.out.println(seasons1.getSeasonsName() + "," + seasons1.getSeasonsDesc());

        System.out.println("----------");

        //遍历
        Seasons[] seasons2 = Seasons.values();
        for (int i = 0; i < seasons2.length; i++) {
            System.out.println(seasons2[i] + "," + seasons2[i].getSeasonsName() + "," + seasons2[i].getSeasonsDesc());
        }
    }
}
